<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    {if $group_id != 2}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Merchant_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-merchant_id" data-rule="" data-source="merchant/index" data-field="shop_name"  data-params='{"custom[examine_status]":"2"}' data-search-field="shop_name"  data-multiple="false" data-pagination="true" data-order-by="id desc" data-page-size="10"  class="form-control selectpage" name="row[merchant_id]" type="text" value="">
        </div>
    </div>
    {/if}
<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Merchant_car_name')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <input id="c-merchant_car_name" class="form-control" name="row[merchant_car_name]" type="text" value="" data-rule="required">-->
<!--        </div>-->
<!--    </div>-->
<!--    {if $group_id != 2}-->
<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Banner')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <div class="input-group">-->
<!--                <input id="c-banner" class="form-control" size="50" name="row[banner]" type="text" value="" data-rule="">-->
<!--                <div class="input-group-addon no-border no-padding">-->
<!--                    <span><button type="button" id="plupload-banner" class="btn btn-danger plupload" data-input-id="c-banner" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="true" data-preview-id="p-banner"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>-->
<!--                    <span><button type="button" id="fachoose-banner" class="btn btn-primary fachoose" data-input-id="c-banner" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>-->
<!--                </div>-->
<!--                <span class="msg-box n-right" for="c-banner"></span>-->
<!--            </div>-->
<!--            <ul class="row list-inline plupload-preview" id="p-banner"></ul>-->
<!--            &lt;!&ndash;            <span style="color: red;">*车辆图片尺寸344*260</span>&ndash;&gt;-->
<!--        </div>-->
<!--    </div>-->
<!--    {else/}-->
<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Banner')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <img src="" alt="" width="120px" data-tips-image data-width="600px">-->
<!--        </div>-->
<!--    </div>-->
<!--    {/if}-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Brand_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-brand_id" data-rule="" data-source="car_cate/index" data-field="cate_name"  data-params='{"custom[type]":"1"}' data-search-field="cate_name"  data-multiple="false" data-pagination="true" data-order-by="sort desc" data-page-size="10"  class="form-control selectpage" name="row[brand_id]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Type_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-type_id" data-rule="" data-source="car_cate/index" data-field="cate_name" data-params='{"custom[type]":"3"}' data-search-field="cate_name" data-multiple="false" data-pagination="true" data-order-by="sort desc"  data-page-size="10"  class="form-control selectpage" name="row[type_id]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Model_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-model_id" data-rule="" data-source="car_cate/index" data-field="cate_name"  data-params='{"custom[type]":"2"}' data-search-field="cate_name"  data-multiple="false" data-pagination="true" data-order-by="sort desc" data-page-size="10"  class="form-control selectpage" name="row[model_id]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Car_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-car_id" data-rule="required" data-source="car/index" data-field="car_name" data-search-field="car_name"  data-multiple="false" data-pagination="true" data-order-by="sort desc" data-page-size="10"  class="form-control selectpage" name="row[car_id]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Car_price')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-car_price" class="form-control" step="1" min="0" name="row[car_price]" type="number" value="0" data-rule="required">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Car_deposit')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-car_deposit" class="form-control" step="1" min="0" name="row[car_deposit]" type="number" value="0" data-rule="required">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Handle_fee')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-handle_fee" class="form-control" step="1" min="0" name="row[handle_fee]" type="number" value="0" data-rule="required">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Night_pick_fee')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-night_pick_fee" class="form-control" step="1" min="0" name="row[night_pick_fee]" type="number" value="0" data-rule="required">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Night_return_fee')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-night_return_fee" class="form-control" step="1" min="0" name="row[night_return_fee]" type="number" value="0" data-rule="required">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Car_number')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-car_number" class="form-control" name="row[car_number]" type="text" value="" data-rule="required">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Drive')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:Form::radios('row[drive]', ['1' => '两驱', '2' => '四驱'], null, ['data-rule'=>'required'])}
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Displacement')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-displacement" class="form-control" name="row[displacement]" type="text" value="" data-rule="required" style="width: 70%">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Car_label')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-car_label" data-rule="" data-source="label/index" data-field="name" data-params='' data-multiple="true" data-pagination="false" data-order-by=""   class="form-control selectpage" name="row[car_label]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Registration_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:Form::datepicker('row[registration_time]', '', ['data-rule'=>'required', 'class'=>'form-control'])}
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Insure_file')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:Form::uploads('row[insure_file]', '', ['data-rule'=>''])}
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Driving_license')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:Form::images('row[driving_license]', '', ['data-rule'=>''])}
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Check_image')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:Form::images('row[check_image]', '', ['data-rule'=>''])}
        </div>
    </div>
<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Car_note')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <textarea id="c-car_note" class="form-control " rows="5" name="row[car_note]" cols="50"></textarea>-->
<!--        </div>-->
<!--    </div>-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Temporary_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <table class="table fieldlist" data-template="eventtpl" data-name="row[temporary_time]" id="first-table">
                <tr>
                    <td>{:__('开始时间')}</td>
                    <td>{:__('结束时间')}</td>
                    <td width="100"></td>
                </tr>
                <tr>
                    <td colspan="4"><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a></td>
                </tr>
            </table>

            <!--请注意实际开发中textarea应该添加个hidden进行隐藏-->
            <textarea name="row[temporary_time]" class="form-control" cols="30" rows="5" style="display: none"></textarea>
            <script id="eventtpl" type="text/html">
                <tr class="form-inline">
                    <td><input type="text" name="<%=name%>[<%=index%>][start_time]" class="form-control datetimepicker" style="width:160px" value="<%=row.start_time%>" placeholder="开始时间" data-date-format="YYYY-MM-DD HH:mm" /></td>
                    <td><input type="text" name="<%=name%>[<%=index%>][end_time]" class="form-control datetimepicker" style="width:160px" value="<%=row.end_time%>" placeholder="结束时间" data-date-format="YYYY-MM-DD HH:mm"/></td>
                    <td>
                        <!--下面的两个按钮务必保留-->
                        <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
<!--                        <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>-->
                    </td>
                </tr>
            </script>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Far_price')}:</label>
        <div class="col-xs-12 col-sm-8">
            <table class="table fieldlist" data-template="eventtpl1" data-name="row[far_price]" id="second-table">
                <tr>
                    <td>{:__('开始时间')}</td>
                    <td>{:__('结束时间')}</td>
                    <td>{:__('起租天数')}</td>
                    <td>{:__('设置价格')}</td>
                    <td width="100"></td>
                </tr>
                <tr>
                    <td colspan="4"><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a></td>
                </tr>
            </table>

            <!--请注意实际开发中textarea应该添加个hidden进行隐藏-->
            <textarea name="row[far_price]" class="form-control" cols="30" rows="5" style="display: none"></textarea>
            <script id="eventtpl1" type="text/html">
                <tr class="form-inline">
                    <td><input type="text" name="<%=name%>[<%=index%>][start_time]" class="form-control datetimepicker" style="width:160px" value="<%=row.start_time%>" placeholder="开始时间" data-date-format="YYYY-MM-DD" /></td>
                    <td><input type="text" name="<%=name%>[<%=index%>][end_time]" class="form-control datetimepicker" style="width:160px" value="<%=row.end_time%>" placeholder="结束时间" data-date-format="YYYY-MM-DD"/></td>
                    <td><input type="number" name="<%=name%>[<%=index%>][days]" class="form-control" style="width:160px" value="<%=row.days%>" placeholder="起租天数" /></td>
                    <td><input type="number" name="<%=name%>[<%=index%>][price]" class="form-control" style="width:160px" value="<%=row.price%>" placeholder="设置价格" /></td>
                    <td>
                        <!--下面的两个按钮务必保留-->
                        <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
                        <!--                        <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>-->
                    </td>
                </tr>
            </script>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Car_insurance')}:</label>
        <div class="col-xs-12 col-sm-8">
            <table class="table fieldlist" data-template="eventtpl2" data-name="row[car_insurance]" id="three-table">
                <tr>
                    <td>{:__('保险保障')}</td>
                    <td>{:__('设置价格')}</td>
                    <td></td>
                    <td width="100"></td>
                </tr>
                <tr>
                    <td colspan="4"><a href="javascript:;" class="btn btn-sm btn-success btn-append" style="display: none"><i class="fa fa-plus"></i> {:__('Append')}</a></td>
                </tr>
            </table>

            <!--请注意实际开发中textarea应该添加个hidden进行隐藏-->
            <textarea name="row[car_insurance]" class="form-control" cols="30" rows="5" style="display: none">{$car_insurance}</textarea>
            <script id="eventtpl2" type="text/html">
                <tr class="form-inline">
                    <td><input type="text" name="<%=name%>[<%=index%>][insure_name]" class="form-control" style="width:160px" value="<%=row.insure_name%>" readonly  /></td>
                    <td><input type="number" name="<%=name%>[<%=index%>][price]" class="form-control" style="width:160px" value="<%=row.price%>" placeholder="设置价格" /></td>
                    <td><input type="hidden" name="<%=name%>[<%=index%>][insure_id]" class="form-control" style="" value="<%=row.insure_id%>" /></td>
                    <td>
                        <!--下面的两个按钮务必保留-->
<!--                        <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>-->
                        <!--                        <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>-->
                    </td>
                </tr>
            </script>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:Form::radios('row[status]', $statuslist, 1, ['data-rule'=>'required'])}
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
